package library.http;

public class Hook<T> {

    private final HttpTask mHttpTask;

    protected Hook(HttpTask mHttpTask) {
        this.mHttpTask = mHttpTask;
    }

    protected HttpTask getHttpTask() {
        return mHttpTask;
    }

    public Hook<T> tag(Object obj) {
        mHttpTask.tag(obj);
        return this;
    }

    public void callback(HttpCallback<T> callback) {
        mHttpTask.callback(callback);
    }

    public String url() {
        return String.valueOf(mHttpTask.request().url());
    }


}